package com.stars.system.monitor.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.stars.system.monitor.mapper.DirectMapper;
import com.stars.system.monitor.domain.Direct;
import com.stars.system.monitor.service.IDirectService;

/**
 * directService业务层处理
 * 
 * @author shuaibizhe
 * @date 2022-08-07
 */
@Service
public class DirectServiceImpl implements IDirectService 
{
    @Autowired
    private DirectMapper directMapper;

    /**
     * 查询direct
     * 
     * @param directId direct主键
     * @return direct
     */
    @Override
    public Direct selectDirectByDirectId(Long directId)
    {
        return directMapper.selectDirectByDirectId(directId);
    }

    /**
     * 获取direct信息
     *
     * @param Direct direct
     * @return 结果
     */
    @Override
    public Boolean selectDirectInfo(Direct Direct)
    {
        return directMapper.selectDirectInfo(Direct);
    }

    /**
     * 查询direct列表
     * 
     * @param Direct direct
     * @return direct
     */
    @Override
    public List<Direct> selectDirectList(Direct Direct)
    {
        return directMapper.selectDirectList(Direct);
    }

    /**
     * 新增direct
     * 
     * @param Direct direct
     * @return 结果
     */
    @Override
    public int insertDirect(Direct Direct)
    {
        Direct.setCreateTime(DateUtils.getNowDate());
        return directMapper.insertDirect(Direct);
    }

    /**
     * 修改direct
     * 
     * @param Direct direct
     * @return 结果
     */
    @Override
    public int updateDirect(Direct Direct)
    {
        return directMapper.updateDirect(Direct);
    }

    /**
     * 批量删除direct
     * 
     * @param directIds 需要删除的direct主键
     * @return 结果
     */
    @Override
    public int deleteDirectByDirectIds(Long[] directIds)
    {
        return directMapper.deleteDirectByDirectIds(directIds);
    }

    /**
     * 删除direct信息
     * 
     * @param directId direct主键
     * @return 结果
     */
    @Override
    public int deleteDirectByDirectId(Long directId)
    {
        return directMapper.deleteDirectByDirectId(directId);
    }
}
